package hbase;

import java.io.IOException;
import java.util.List;

public class LogDetailServlet extends javax.servlet.http.HttpServlet {
    protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        doGet(request, response);
    }

    protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {

        response.setContentType("text/html");

        getServletConfig().getServletContext().setAttribute("message", "Hello,HBase<br>");
        //String[] logs = {"A", "B"};
        List<String> logs= (new UserLogFromHBase()).
                getUserLogList("student",
                        new String[]{"cf1","cf2","Name","Student_Status"});
        request.setAttribute("logs", logs);
        request.getRequestDispatcher("/sinformation.jsp").forward(request, response);
    }
}
